// 请求接口
import { getList,addPayment } from '@/api/payment'

import Qs from 'qs'


const state = {}

const mutations = {


}

const actions = {

  // 获取订单列表信息
  async payChart({commit},serchForm) {
    let {time} = serchForm

    let res ;
      if(time.length > 1) {
          res = await getList({createTime:time[0],updateTime:time[1]});
      }else{
        // 没有时间的查询
          res = await getList({createTime:'',updateTime:''});
      }
    return res
  },
  async addPayment({},payment) {
    let res = await addPayment(payment);
    return res
  }

  
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}

